.class public Lcom/estrongs/android/ui/dialog/m0;
.super Ljava/lang/Object;
.source "PermissionDialog.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/ui/dialog/m0$f;
    }
.end annotation


# instance fields
.field private a:Landroid/content/Context;

.field private b:Lcom/estrongs/android/ui/dialog/q;

.field private c:Ljava/lang/String;

.field private d:Lorg/json/JSONArray;

.field private e:Landroid/os/Handler;

.field private f:Lcom/estrongs/android/ui/dialog/m0$f;

.field private g:Z

.field h:Lcom/estrongs/android/ui/dialog/ProgressDialog;

.field private i:Z


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;ZZ)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/m0;->h:Lcom/estrongs/android/ui/dialog/ProgressDialog;

    .line 3
    iput-object p1, p0, Lcom/estrongs/android/ui/dialog/m0;->a:Landroid/content/Context;

    .line 4
    iput-object p2, p0, Lcom/estrongs/android/ui/dialog/m0;->c:Ljava/lang/String;

    .line 5
    new-instance p1, Landroid/os/Handler;

    invoke-direct {p1}, Landroid/os/Handler;-><init>()V

    iput-object p1, p0, Lcom/estrongs/android/ui/dialog/m0;->e:Landroid/os/Handler;

    .line 6
    iput-boolean p3, p0, Lcom/estrongs/android/ui/dialog/m0;->g:Z

    .line 7
    iput-boolean p4, p0, Lcom/estrongs/android/ui/dialog/m0;->i:Z

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/ui/dialog/m0;)Lcom/estrongs/android/ui/dialog/m0$f;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/m0;->f:Lcom/estrongs/android/ui/dialog/m0$f;

    return-object p0
.end method

.method static synthetic a(Lcom/estrongs/android/ui/dialog/m0;Lorg/json/JSONArray;)Lorg/json/JSONArray;
    .locals 0

    .line 3
    iput-object p1, p0, Lcom/estrongs/android/ui/dialog/m0;->d:Lorg/json/JSONArray;

    return-object p1
.end method

.method static synthetic a(Lcom/estrongs/android/ui/dialog/m0;Z)Z
    .locals 0

    .line 2
    iput-boolean p1, p0, Lcom/estrongs/android/ui/dialog/m0;->g:Z

    return p1
.end method

.method static synthetic b(Lcom/estrongs/android/ui/dialog/m0;)Ljava/lang/String;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/m0;->c:Ljava/lang/String;

    return-object p0
.end method

.method private b()V
    .locals 10

    .line 2
    iget-boolean v0, p0, Lcom/estrongs/android/ui/dialog/m0;->i:Z

    if-eqz v0, :cond_0

    .line 3
    :try_start_0
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/m0;->c:Ljava/lang/String;

    sget-object v1, Lcom/estrongs/android/pop/esclasses/g;->b:Ljava/lang/String;

    new-instance v2, Lcom/estrongs/android/ui/dialog/m0$b;

    invoke-direct {v2, p0}, Lcom/estrongs/android/ui/dialog/m0$b;-><init>(Lcom/estrongs/android/ui/dialog/m0;)V

    invoke-static {v0, v1, v2}, Les/nu;->a(Ljava/lang/String;Ljava/lang/String;Les/nu$e;)Ljava/lang/String;
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_3

    :catch_0
    move-exception v0

    .line 4
    invoke-virtual {v0}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_3

    .line 5
    :cond_0
    :try_start_1
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/m0;->a:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v0

    .line 6
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/m0;->c:Ljava/lang/String;

    const/16 v2, 0x1000

    invoke-virtual {v0, v1, v2}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v1

    .line 7
    new-instance v2, Lorg/json/JSONArray;

    invoke-direct {v2}, Lorg/json/JSONArray;-><init>()V

    .line 8
    new-instance v3, Lorg/json/JSONArray;

    invoke-direct {v3}, Lorg/json/JSONArray;-><init>()V

    .line 9
    iget-object v4, v1, Landroid/content/pm/PackageInfo;->requestedPermissions:[Ljava/lang/String;

    const/4 v5, 0x0

    if-eqz v4, :cond_1

    .line 10
    iget-object v1, v1, Landroid/content/pm/PackageInfo;->requestedPermissions:[Ljava/lang/String;

    array-length v4, v1

    const/4 v6, 0x0

    :goto_0
    if-ge v6, v4, :cond_1

    aget-object v7, v1, v6

    .line 11
    new-instance v8, Lorg/json/JSONObject;

    invoke-direct {v8}, Lorg/json/JSONObject;-><init>()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_2

    .line 12
    :try_start_2
    invoke-virtual {v0, v7, v5}, Landroid/content/pm/PackageManager;->getPermissionInfo(Ljava/lang/String;I)Landroid/content/pm/PermissionInfo;

    move-result-object v7

    const-string v9, "name"

    .line 13
    invoke-virtual {v7, v0}, Landroid/content/pm/PermissionInfo;->loadLabel(Landroid/content/pm/PackageManager;)Ljava/lang/CharSequence;

    move-result-object v7

    invoke-virtual {v8, v9, v7}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v7, "disable"

    .line 14
    invoke-virtual {v8, v7, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    .line 15
    invoke-virtual {v3, v8}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
    :try_end_2
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_2 .. :try_end_2} :catch_1
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_2

    goto :goto_1

    :catch_1
    move-exception v7

    .line 16
    :try_start_3
    invoke-virtual {v7}, Landroid/content/pm/PackageManager$NameNotFoundException;->printStackTrace()V

    :goto_1
    add-int/lit8 v6, v6, 0x1

    goto :goto_0

    .line 17
    :cond_1
    :goto_2
    invoke-virtual {v3}, Lorg/json/JSONArray;->length()I

    move-result v0

    if-ge v5, v0, :cond_2

    .line 18
    invoke-virtual {v3, v5}, Lorg/json/JSONArray;->get(I)Ljava/lang/Object;

    move-result-object v0

    invoke-virtual {v2, v0}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;

    add-int/lit8 v5, v5, 0x1

    goto :goto_2

    .line 19
    :cond_2
    iput-object v2, p0, Lcom/estrongs/android/ui/dialog/m0;->d:Lorg/json/JSONArray;

    .line 20
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/m0;->e:Landroid/os/Handler;

    new-instance v1, Lcom/estrongs/android/ui/dialog/m0$c;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/dialog/m0$c;-><init>(Lcom/estrongs/android/ui/dialog/m0;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_2

    goto :goto_3

    :catch_2
    move-exception v0

    .line 21
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    :goto_3
    return-void
.end method

.method private c()V
    .locals 4

    .line 2
    invoke-direct {p0}, Lcom/estrongs/android/ui/dialog/m0;->b()V

    .line 3
    new-instance v0, Landroid/widget/ListView;

    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/m0;->a:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/ListView;-><init>(Landroid/content/Context;)V

    const v1, 0x7f080816

    .line 4
    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setSelector(I)V

    .line 5
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/m0;->a:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0809d4

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setDivider(Landroid/graphics/drawable/Drawable;)V

    const/4 v1, 0x1

    .line 6
    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setFocusable(Z)V

    const/4 v1, 0x0

    .line 7
    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setCacheColorHint(I)V

    .line 8
    iget-boolean v1, p0, Lcom/estrongs/android/ui/dialog/m0;->g:Z

    if-eqz v1, :cond_0

    const v1, 0x7f11063e

    goto :goto_0

    :cond_0
    const v1, 0x7f110b4d

    .line 9
    :goto_0
    new-instance v2, Lcom/estrongs/android/ui/dialog/q$n;

    iget-object v3, p0, Lcom/estrongs/android/ui/dialog/m0;->a:Landroid/content/Context;

    invoke-direct {v2, v3}, Lcom/estrongs/android/ui/dialog/q$n;-><init>(Landroid/content/Context;)V

    invoke-virtual {v2, v1}, Lcom/estrongs/android/ui/dialog/q$n;->b(I)Lcom/estrongs/android/ui/dialog/q$n;

    .line 10
    invoke-virtual {v2, v0}, Lcom/estrongs/android/ui/dialog/q$n;->a(Landroid/view/View;)Lcom/estrongs/android/ui/dialog/q$n;

    invoke-virtual {v2}, Lcom/estrongs/android/ui/dialog/q$n;->a()Lcom/estrongs/android/ui/dialog/q;

    move-result-object v1

    iput-object v1, p0, Lcom/estrongs/android/ui/dialog/m0;->b:Lcom/estrongs/android/ui/dialog/q;

    .line 11
    new-instance v1, Lcom/estrongs/android/ui/dialog/m0$f;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/dialog/m0$f;-><init>(Lcom/estrongs/android/ui/dialog/m0;)V

    iput-object v1, p0, Lcom/estrongs/android/ui/dialog/m0;->f:Lcom/estrongs/android/ui/dialog/m0$f;

    .line 12
    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 13
    new-instance v1, Lcom/estrongs/android/ui/dialog/m0$a;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/dialog/m0$a;-><init>(Lcom/estrongs/android/ui/dialog/m0;)V

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    .line 14
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/m0;->b:Lcom/estrongs/android/ui/dialog/q;

    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/q;->show()V

    return-void
.end method

.method static synthetic c(Lcom/estrongs/android/ui/dialog/m0;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/ui/dialog/m0;->b()V

    return-void
.end method

.method static synthetic d(Lcom/estrongs/android/ui/dialog/m0;)Z
    .locals 0

    .line 1
    iget-boolean p0, p0, Lcom/estrongs/android/ui/dialog/m0;->g:Z

    return p0
.end method

.method static synthetic e(Lcom/estrongs/android/ui/dialog/m0;)Lorg/json/JSONArray;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/m0;->d:Lorg/json/JSONArray;

    return-object p0
.end method

.method static synthetic f(Lcom/estrongs/android/ui/dialog/m0;)Landroid/content/Context;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/m0;->a:Landroid/content/Context;

    return-object p0
.end method

.method static synthetic g(Lcom/estrongs/android/ui/dialog/m0;)Landroid/os/Handler;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/m0;->e:Landroid/os/Handler;

    return-object p0
.end method

.method static synthetic h(Lcom/estrongs/android/ui/dialog/m0;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/ui/dialog/m0;->c()V

    return-void
.end method


# virtual methods
.method public a()V
    .locals 4

    .line 4
    iget-boolean v0, p0, Lcom/estrongs/android/ui/dialog/m0;->g:Z

    if-eqz v0, :cond_0

    .line 5
    :try_start_0
    iget-object v0, p0, Lcom/estrongs/android/ui/dialog/m0;->e:Landroid/os/Handler;

    new-instance v1, Lcom/estrongs/android/ui/dialog/m0$d;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/dialog/m0$d;-><init>(Lcom/estrongs/android/ui/dialog/m0;)V

    const-wide/16 v2, 0x320

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 6
    new-instance v0, Lcom/estrongs/android/ui/dialog/m0$e;

    invoke-direct {v0, p0}, Lcom/estrongs/android/ui/dialog/m0$e;-><init>(Lcom/estrongs/android/ui/dialog/m0;)V

    invoke-static {v0}, Les/nu;->a(Les/nu$f;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    const/4 v0, 0x0

    .line 7
    iput-boolean v0, p0, Lcom/estrongs/android/ui/dialog/m0;->g:Z

    goto :goto_0

    .line 8
    :cond_0
    invoke-direct {p0}, Lcom/estrongs/android/ui/dialog/m0;->c()V

    :goto_0
    return-void
.end method
